// #pragma once
#ifndef _NEWWIDGET_H_
#define _NEWWIDGET_H_


#include <QWidget>
#include <QDebug>
#include <QGridLayout>

#include "task.h"

class NewWidget : public QWidget
{
    Q_OBJECT

public:
    NewWidget(QWidget * parent = nullptr);
    ~NewWidget();

    void mouseDoubleClickEvent(QMouseEvent * event);
    void mousePressEvent(QMouseEvent * event);

    void setWidget(Task * task, QWidget * widget, QWidget * parent, QGridLayout * parentLayout, int row, int col)
    {
        m_widget = widget;
        m_row = row; 
        m_col = col;
        m_parent = parent;
        m_parentLayout = parentLayout;
        m_task = task;
    }

private:
    QWidget *               m_widget            = nullptr;
    QWidget *               m_parent            = nullptr;
    QGridLayout *           m_parentLayout      = nullptr;
    Task *                  m_task              = nullptr;
    int                     m_row;
    int                     m_col;
};


#endif
